#pragma once
#include<list>
#include<deque>

namespace xhy
{
	template<class T, class Contairon = deque<T>>
	class queue
	{
	public:
		void push(const T& val)
		{
			_q.push_back(val);
		}

		void pop()
		{
			_q.pop_front();
		}

		T& back()
		{
			return _q.back();
		}

		size_t size() const
		{
			return _q.size();
		}

		const T& back() const
		{
			return _q.back();
		}

		T& front()
		{
			return _q.front();
		}

		const T& front() const
		{
			return _q.front();
		}

		bool empty() const
		{
			return _q.empty();
		}

	private:
		Contairon _q;
	};
}